﻿using System;
using System.Data;
using System.Data.Common;
using Liger.Common;
using Liger.Data;

namespace EasyFMS.Model
{

	/// <summary>
	/// 实体类vOnlineUser
	/// </summary>
	[Serializable]
	public class vOnlineUser : Entity 
	{ 
		 public vOnlineUser() 
            : base("vOnlineUser") 
        { 

        }


		#region Model
		private string _usercode;
		private string _username;
		private string _hostprocess;
		private string _hostname;
		private string _net_address;
		private DateTime _login_time;
		private string _lastwaittype;
		private string _open_tran;
		private string _status;
		private string _net_library;
	 
		/// <summary>
		/// 
		/// </summary>
		public string usercode
		{
			get{ return _usercode; }
			set
			{
				this.OnPropertyValueChange(_.usercode,_usercode,value);
				this._usercode = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string username
		{
			get{ return _username; }
			set
			{
				this.OnPropertyValueChange(_.username,_username,value);
				this._username = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string hostprocess
		{
			get{ return _hostprocess; }
			set
			{
				this.OnPropertyValueChange(_.hostprocess,_hostprocess,value);
				this._hostprocess = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string hostname
		{
			get{ return _hostname; }
			set
			{
				this.OnPropertyValueChange(_.hostname,_hostname,value);
				this._hostname = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string net_address
		{
			get{ return _net_address; }
			set
			{
				this.OnPropertyValueChange(_.net_address,_net_address,value);
				this._net_address = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public DateTime login_time
		{
			get{ return _login_time; }
			set
			{
				this.OnPropertyValueChange(_.login_time,_login_time,value);
				this._login_time = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string lastwaittype
		{
			get{ return _lastwaittype; }
			set
			{
				this.OnPropertyValueChange(_.lastwaittype,_lastwaittype,value);
				this._lastwaittype = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string open_tran
		{
			get{ return _open_tran; }
			set
			{
				this.OnPropertyValueChange(_.open_tran,_open_tran,value);
				this._open_tran = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string status
		{
			get{ return _status; }
			set
			{
				this.OnPropertyValueChange(_.status,_status,value);
				this._status = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string net_library
		{
			get{ return _net_library; }
			set
			{
				this.OnPropertyValueChange(_.net_library,_net_library,value);
				this._net_library = value;
			}
		}
		#endregion

		#region Method
		/// <summary>
		/// 获取列信息
		/// </summary>
		public override Field[] GetFields()
		{
			return new Field[] {
				_.usercode,
				_.username,
				_.hostprocess,
				_.hostname,
				_.net_address,
				_.login_time,
				_.lastwaittype,
				_.open_tran,
				_.status,
				_.net_library
			};
		}
		/// <summary>
		/// 获取值信息
		/// </summary>
		public override object[] GetValues()
		{
			return new object[] {
				_usercode,
				_username,
				_hostprocess,
				_hostname,
				_net_address,
				_login_time,
				_lastwaittype,
				_open_tran,
				_status,
				_net_library
			};
		} 
		/// <summary>
		/// 设置字段值
		/// </summary>
		public override void SetValue(string fieldName, object value)
        {
            switch (fieldName)
            { 
				case "usercode":
                    this._usercode = DataHelper.ConvertValue<string>(value);
                    break; 
				case "username":
                    this._username = DataHelper.ConvertValue<string>(value);
                    break; 
				case "hostprocess":
                    this._hostprocess = DataHelper.ConvertValue<string>(value);
                    break; 
				case "hostname":
                    this._hostname = DataHelper.ConvertValue<string>(value);
                    break; 
				case "net_address":
                    this._net_address = DataHelper.ConvertValue<string>(value);
                    break; 
				case "login_time":
                    this._login_time = DataHelper.ConvertValue<DateTime>(value);
                    break; 
				case "lastwaittype":
                    this._lastwaittype = DataHelper.ConvertValue<string>(value);
                    break; 
				case "open_tran":
                    this._open_tran = DataHelper.ConvertValue<string>(value);
                    break; 
				case "status":
                    this._status = DataHelper.ConvertValue<string>(value);
                    break; 
				case "net_library":
                    this._net_library = DataHelper.ConvertValue<string>(value);
                    break; 
            }
        }
		/// <summary>
		/// 获取字段值
		/// </summary>
        public override object GetValue(string fieldName)
        {
            switch (fieldName)
            { 
				case "usercode":
                    return this._usercode; 
				case "username":
                    return this._username; 
				case "hostprocess":
                    return this._hostprocess; 
				case "hostname":
                    return this._hostname; 
				case "net_address":
                    return this._net_address; 
				case "login_time":
                    return this._login_time; 
				case "lastwaittype":
                    return this._lastwaittype; 
				case "open_tran":
                    return this._open_tran; 
				case "status":
                    return this._status; 
				case "net_library":
                    return this._net_library; 
				default :
                    return null;
            } 
        }



		#endregion

		#region _Field
		/// <summary>
		/// 字段信息
		/// </summary>
		public class _
		{
			/// <summary>
			/// * 
			/// </summary>
			public readonly static Field All = new Field("*","vOnlineUser");
 
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field usercode = new Field("usercode","vOnlineUser","usercode");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field username = new Field("username","vOnlineUser","username");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field hostprocess = new Field("hostprocess","vOnlineUser","hostprocess");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field hostname = new Field("hostname","vOnlineUser","hostname");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field net_address = new Field("net_address","vOnlineUser","net_address");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field login_time = new Field("login_time","vOnlineUser","login_time");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field lastwaittype = new Field("lastwaittype","vOnlineUser","lastwaittype");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field open_tran = new Field("open_tran","vOnlineUser","open_tran");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field status = new Field("status","vOnlineUser","status");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field net_library = new Field("net_library","vOnlineUser","net_library");
		}
		#endregion

 
	}
}

